'Note: This Script is designed for client installs to Windows versions 3.X only
CONST INSTITLE$ ="VirusScan for Windows Install"
CONST CRLF$ =CHR$(13)+CHR$(10)
Sub Notify(blurb$)
' Keep the user informed, so they don't think the script is hung.
' Make sure the borderless dialog is not in use by another application.
MsgClose
' Create one with:
' our message
' until closed
' no Cancel -- change to TRUE if you want users to be able to interrupt
' or thermometer
' at x,y (if x,y is left off, the dialog will center)
MsgOpen blurb, 0, FALSE, FALSE
Sleep 5000 'sleep if you are using the message box without buttons...
End Sub
Sub ScriptDone(blurb$,good%)
MsgClose ' so we don't leave the borderless dialog hanging
if good then
msg$=blurb$
else
msg$=blurb$+CRLF+" Please contact your System Administrator."
end if
MsgBox msg$,0,INSTITLE$
If Not good then
END
End If
End Sub
Sub MakeIcon(ico$)
'initiate a DDE converstation with the shell, ask it to create a group and icon
'this method should work under most Program Manager replacements.
DDETimeout 5000 'set time out to 5 seconds (default is 10000 milliseconds)
channel% = DDEInitiate("progman","progman")
if channel = 0 then
DDETerminateAll 'just in case the shell doesn't respond
ScriptDone "Unable to initiate DDE with your shell - no icon was created."+CRLF+"You will need to run C:\MCAFEE\VIRUSCAN\WSCAN.EXE"+CRLF+"to launch Windows VirusScan.",TRUE
end if
' note: It is possible to add more DDE to ask if a McAfee VirusScan group already exists.